package com.itheima.reggie.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class Orders implements Serializable {
    private Long id;

    //订单号
    private String number;
    //订单状态 1待支付 2待派送 3已派送 4已完成 5已取消
    private Integer status;
    //下单用户id
    private Long userId;
    //地址id
    private Long addressId;
    //下单时间
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date orderTime;

    //结账时间
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date checkoutTime;
    //支付方式
    private Integer payMethod;
    //支付金额
    private BigDecimal amount;
    //备注
    private String remark;
    //用户名
    private String userName;
    //手机号
    private String phone;
    //地址
    private String address;
    //收货人
    private String consignee;


    @TableField(exist = false)
    private List<OrderDetail> orderDetails = new ArrayList<>();


}
